<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title>同步修复</title>
  <meta name="renderer" content="webkit">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
  {include file="public/css"/}
	<script src="/static/admin/js/address3.js?v=20220330"></script>
</head>
<body>
  <div class="layui-fluid">
    <div class="layui-row layui-col-space15">
      <div class="layui-card layui-col-md12">
				<div class="layui-card-header"><i class="fa fa-cog"></i> 同步修复</div>
				<div class="layui-card-body" pad15>
					<blockquote class="layui-elem-quote">用于订单发货和收货后小程序端未同步时进行修复</blockquote>
					<div class="layui-form" lay-filter="">
						<div class="layui-form-item">
							<div class="layui-form-label" style="width:100px">订单ID：</div>
							<div class="layui-input-inline">
								<input class="layui-input" id="orderid" name="orderid" value=""/>
							</div>
							<div class="layui-btn layui-btn-primary" style="float:left" onclick="getorderinfo()">查询</div>
						</div>
						<div class="layui-form-item">
							<label class="layui-form-label" style="width:100px">快递公司：</label>
							<div class="layui-input-inline">
								<select name="express_com" id="express_com">
									{foreach $express_data as $k=>$v}
									<option value="{$k}">{$k}</option>
									{/foreach}
								</select>
							</div>
						</div>
						<div class="layui-form-item">
							<label class="layui-form-label" style="width:100px">快递单号：</label>
							<div class="layui-input-inline" style="width:200px">
								<input type="text" id="express_no" name="express_no" value="" class="layui-input">
							</div>
						</div>
						
						<div class="layui-form-item">
							<label class="layui-form-label" style="width:100px">类型：</label>
							<div class="layui-input-inline" style="width:200px">
								<input type="radio" name="type" value="0" title="发货" checked/>
								<input type="radio" name="type" value="1" title="收货"/>
							</div>
							<div class="layui-form-mid layui-word-aux" style="margin-left:10px;"></div>
						</div>
						<div class="layui-form-item">
							<div class="layui-input-block" style="margin-left:130px;">
								<button class="layui-btn" lay-submit lay-filter="formsubmit">提 交</button>
							</div>
						</div>
					</div>
				</div>
			</div>
    </div>
  </div>
	{include file="public/js"/}
	<script>
	function getorderinfo(){
		var orderid = $('#orderid').val();
		if(!orderid){
			dialog('请填写订单ID');return;
		}
		$.post("{:url('ShopOrder/getdetail')}",{orderid:orderid},function(res){
			if(res.order){
				$('#express_com').val(res.order.express_com);
				$('#express_no').val(res.order.express_no);
				layui.form.render();
			}else{
				dialog(data.msg,data.status);
			}
		})
	}
	layui.form.on('submit(formsubmit)', function(obj){
		var field = obj.field
		$.post("",field,function(data){
			dialog(data.msg,data.status);
		})
	})
	
	var chooseUrlField = '';
	function chooseUrl2(field){
		chooseUrlField = field;
		layer.open({type:2,shadeClose:true,area:['1100px', '650px'],'title':'选择链接',content:"{:url('DesignerPage/chooseurl')}&callback=chooseLink2"})
	}
	function chooseLink2(urlname,url){
		$("#"+chooseUrlField).val(url);
	}
  </script>
	{include file="public/copyright"/}
</body>
</html>